<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>班级信息 - ${bean.name }</title>
<c:import url="/WEB-INF/jsp/head.jsp" />
<script type="text/javascript" src="static/js/class/info.js"></script>
<style type="text/css">
.table th, .table td {
	text-align: center;
	vertical-align: middle !important;
}
</style>
</head>
<body>
	<div class="default-theme container-fluid iframe">
		<div class="col-md-8">
			<form id="class-form" class="form-horizontal">
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label"><i
						class="text-danger">*</i> 班级名称</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="name"
							readonly="readonly" placeholder="班级名称" value="${bean.name }">
					</div>
				</div>
				<div class="form-group">
					<label for="product.id" class="col-sm-2 control-label"><i
						class="text-danger">*</i> 产品</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="product.id"
							value="${bean.product.name }" readonly="readonly">
					</div>
				</div>
				<div class="form-group">
					<label for="teacherName" class="col-sm-2 control-label"><i
						class="text-danger">*</i> 教员</label>
					<div class="col-sm-10">
						<table class="table table-hover table-border">
							<thead>
								<tr>
									<th>教师编号</th>
									<th>教师名称</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${bean.teachers }" var="item">
									<tr>
										<td>${item.id }</td>
										<td>${item.name }</td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
					</div>
				</div>
				<div class="form-group">
					<label for="tel" class="col-sm-2 control-label"><i
						class="text-danger">*</i> 辅导员</label>
					<div class="col-sm-10">
						<table class="table table-hover table-border">
							<thead>
								<tr>
									<th>教师编号</th>
									<th>教师名称</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${bean.instructors }" var="item">
									<tr>
										<td>${item.id }</td>
										<td>${item.name }</td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
					</div>
				</div>
				<div class="form-group">
					<label for="tel" class="col-sm-2 control-label">班级状态</label>
					<div class="col-sm-10">
						<label for="tel" class="control-label"> <c:choose>
								<c:when test="${2 == bean.status }">
									未开课
								</c:when>
								<c:when test="${3 == bean.status }">
									在读
								</c:when>
								<c:when test="${4 == bean.status }">
									结课
								</c:when>
								<c:otherwise>
									未知状态
								</c:otherwise>
							</c:choose>
						</label>
					</div>
				</div>
				<div class="form-group">
					<label for="tel" class="col-sm-2 control-label">预科时间</label>
					<div class="col-sm-10">
						<input type="text" class="form-control datetimepicker"
							name="preparatoryDate" readonly="readonly" placeholder="预科时间"
							value="<fmt:formatDate pattern="yyyy-MM-dd" value="${bean.preparatoryDate }" />" />
					</div>
				</div>
				<div class="form-group">
					<label for="openDate" class="col-sm-2 control-label">正课时间</label>
					<div class="col-sm-10">
						<input type="text" class="form-control datetimepicker"
							name="openDate" readonly="readonly" placeholder="正课时间"
							value="<fmt:formatDate pattern="yyyy-MM-dd" value="${bean.openDate }" />" />
					</div>
				</div>
				<div class="form-group">
					<label for="trainDate" class="col-sm-2 control-label">实训时间</label>
					<div class="col-sm-10">
						<input class="form-control datetimepicker" name="trainDate"
							readonly="readonly" placeholder="实训时间"
							value="<fmt:formatDate pattern="yyyy-MM-dd" value="${bean.trainDate }" />" />
					</div>
				</div>
				<div class="form-group">
					<label for="endDate" class="col-sm-2 control-label">毕业时间</label>
					<div class="col-sm-10">
						<input class="form-control datetimepicker" name="endDate"
							readonly="readonly" placeholder="毕业时间"
							value="<fmt:formatDate pattern="yyyy-MM-dd" value="${bean.endDate }" />" />
					</div>
				</div>
				<div class="form-group">
					<label for="endDate" class="col-sm-2 control-label"></label>
					<div class="col-sm-10">
						<i class="text-danger">填写毕业时间后，班级状态将会自动更改为结课状态，且不能修改</i>
					</div>
				</div>
				<div class="form-group">
					<label for="remarks" class="col-sm-2 control-label">备注</label>
					<div class="col-sm-10">
						<textarea class="form-control" name="remarks" placeholder="备注"
							readonly="readonly">${bean.remarks }</textarea>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-10">
						<!-- <a type="submit" class="btn btn-primary" href="javascript:history.back();">返回</a> -->
					</div>
				</div>
			</form>
		</div>
	</div>
</body>
</html>